package com.hyxt.DTO;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSON;
import com.hyxt.api.TermianalLinkServer;
import com.hyxt.utils.IRedisMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author shenp
 * @version v1.0
 * @Description 监听终端链路管理消息
 * @Date: Create in 15:36 2017/11/26
 * @Modifide By:
 **/
@Component
public class TermianalManagerListener extends IRedisMessageListener {
    @Reference(version = "1.0.0")
    TermianalLinkServer termianalLinkServer;
    @Override
    public void onMessage(String channel, String message) {
        System.out.println(channel);
        termianalLinkServer.deleteChannel(message);
    }
}
